﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Patient.aspx.cs" Inherits="WebForms.Doctor.Patient" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Patient Data requested by
        <asp:Label ID="DocNameValue" runat="server" /></h2>
    <table>
        <tr>
            <td>
                Name
            </td>
            <td>
                <asp:Label ID="NameValue" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                Primary Doctor
            </td>
            <td>
                <asp:Label ID="primaryDoctor" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                SocialSecurity
            </td>
            <td>
                <asp:Label ID="SocialSecurityValue" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                TimeCreated
            </td>
            <td>
                <asp:Label ID="TimeCreatedValue" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                Phone
            </td>
            <td>
                <asp:Label ID="PhoneValue" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                Email
            </td>
            <td>
                <asp:Label ID="EmailValue" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                PassKey
            </td>
            <td>
                <asp:Label ID="PassKeyValue" runat="server" />
            </td>
        </tr>
    </table>

    <asp:Button ID="grantaccessBut" runat="server" Text="Grant access" 
        onclick="grantaccessBut_Click" />
    
    <h3><asp:Label ID="VSHead" Text="Events" runat="server" /></h3>
    <asp:GridView ID="gvEvents" runat="server" AutoGenerateColumns="False">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="EventId,CitizenId" 
                DataNavigateUrlFormatString="/Doctor/events.aspx?eventId={0}&amp;citizenId={1}" 
                DataTextField="EventId" HeaderText="Event" />
            <asp:BoundField DataField="Subject" HeaderText="Subject" />
            <asp:BoundField DataField="MainText" HeaderText="MainText" />
            <asp:BoundField DataField="Equipment" HeaderText="Equipment" />
            <asp:BoundField DataField="EventType" HeaderText="Event Type" />
            <asp:BoundField DataField="TimeCreated" HeaderText="Time Created" />
        </Columns>
    </asp:GridView>
</asp:Content>
